package cn.regexp.auth.domain;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Regexpei
 * @date 2024/7/3 22:00
 * @description 登录日志类
 */
@Getter
@Setter
@NoArgsConstructor
public class LoginLog implements Serializable {
    private static final long serialVersionUID = 1L;

    public static Boolean LOGIN_SUCCESS = Boolean.TRUE;

    public static Boolean LOGIN_FAIL = Boolean.FALSE;

    private Long id;
    /**
     * 登陆用户的手机号码
     */
    private Long phone;

    /**
     * 登录 IP
     */
    private String loginIp;
    /**
     * 登录时间
     */
    private Date loginTime;
    /**
     * 登录状态
     */
    private Boolean state = LOGIN_SUCCESS;

    public LoginLog(Long phone, String loginIp, Date loginTime) {
        this.phone = phone;
        this.loginIp = loginIp;
        this.loginTime = loginTime;
    }

}
